Skip to main content
search

How is Unity Mobile Game Test Automated?

Mobile games are now among the most demanded applications today. Every day, millions of people around the world download the games they like on their smart devices and have a good time, and this situation increases the competition among the companies that develop mobile games day by day. As with every software product, mobile games should be tested to ensure that they meet the expected quality conditions in these challenging and competitive conditions. In this case, with the automation of the tests developed for mobile games, software errors and deficiencies in the development of the application will be detected in the fastest way.

Tools and Technologies which Used

Java as Programming Language

Maven as Build Engine

TestNG as Test Framework

Appium as Mobile Application Test Automation Tool

AltUnity Inspector as UI Element Inspection Tool 

AltUnity Driver as Unity Test Automation Tool 

 

Which Tools and Technologies will Use?

 

Java: An Object-Oriented programming language that we write test automation scripts.

Maven: A project build tool that provides adding necessary methods to our library as dependencies in the pom.xml file easily and access to them.

TestNG: Test framework that provides configure test suites in the project and also runs tests as parallel.

Appium:

appium_keytorc_blog

1. Appium is an HTTP server written with Node.js.

2. Appium server receives scripts that have been written by Java, Ruby, C#, PHP clients, etc. in JSON format, and the scripts are run on mobile devices by Appium Server. Appium Server must be installed. The server is run by Appium Client scripts.

3. With scripts have been written before, the test scenarios have been run by Appium Server. Then, a response is been sent from mobile devices to the Appium server

4. Finally, the results are been sent by the Appium server to the Appium client as a log and displayed on the console.

 

AltUnity Tester and AltUnity Inspector:

altunity_tester

 

AltUnity Tester

AltUnity Tester is an open-source test automation tool.

The tool provides finding UI objects for UI test automation for Unity games. 

We can write scripts that are related to automation with Java, C#, and Python programming languages.

We can run the automation on mobile devices or Unity

We can handle elements, texts of the elements, coordinates of elements and, unity pieces in the games

We can take a screenshot

We can integrate with Appium

We can get results and report of the test in Unity Editor 

We can manipulated test data

 

Installation Appium and Using on Mobile Game Automation

The game its automation has been wanted can be started in the project rather than a manual start:

 

Appium Using:

Appium capabilities can be set in the project (Java, Python, and C#)

Some Capabilities:

Operational System of mobile device

Name of mobile device

UDID number of mobile device

Package and activate the name of the mobile game

Requirement IP address to connect Appium Server; 127.0.0.1 or 0.0.0.0 The port number, device IP, etc. for AltUnity Server that is requirement capabilities.

 

Thus, the application written with test automation scripts with Appium Server will start on the device when the project is run without any intervention. The Importance of Test Automation Processes in Mobile Game Projects Testing games is a process that requires extensive testing of errors that may occur in each new build and iterates with each new release. With each new prototype of the game, the test documentation needs to be reworked frequently to update any changes in specifications, new test cases, and new configuration support. With each new release, compatibility checks must be performed on different devices.

Considering the variety of mobile devices on the market, the efficiency and benefit to be obtained will be multiplied in line with the scale of the project, when the manual test operations to be performed will be repeated for each device, compared to the case of running the same tests for all different devices through a single automation script.

Manual execution of regression test runs requires a lot of time and manpower. With automation, it is most convenient to reduce this effort by having testers only validate failed tests, rather than repeatedly running end-to-end regression tests. Also, test cases can be rerun when a change is made to the application. With automation, developers will be able to integrate new application features without negatively impacting the time and cost of application testing.

As the number and scope of test cases increase, so does the test run effort. In order to reduce this increased effort, it will be possible to make these harnesses independent of the human factor and faster with automation. In the image below, the effort of different test runs can be compared graphically:

manual_vs_automation_test

It will enable a more efficient software development life cycle by eliminating the reduced test harness effort and human factor errors during the harness. This gain from test efforts will help the dev team direct their efforts towards higher priority actions.

While the initial investment cost for test automation and the operational costs afterward create more expenses than manual testing at first, the increase in automated test scenarios in the future will ensure that all these long-term expenses will be more than compensated with the time and effort efficiency it saves. You can examine the graphic of Manual and Automation Tests in the image below:

test_otomasyon

Test automation projects are software development activities. For this reason, the evaluation of the return of the expenses to be made while making the automation decision is an important metric in measuring the success of this software development activity.

Effective mobile gaming test automation is achieved through a well-structured and systematic approach, the use of a test automation framework, and seamless integration within agile processes. Naturally, the goal of testing is to identify bugs and help developers remove them. With; To target efficient, results-driven testing, it is imperative to have test automation as part of the overall development process.

 

Berk Toprakçı & Murat Ersoy

Close Menu